package ttOrder.conf;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import ttOrder.interceptor.UserLoginInterceptor;


@Configuration
public class WebMvcConf extends WebMvcConfigurerAdapter{
    @Autowired
    private UserLoginInterceptor userLoginInterceptor;
    
    //拦截器	
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(userLoginInterceptor).addPathPatterns("/**").excludePathPatterns("/login");//配置登录拦截器拦截路径
    }
}



